﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

namespace IURIP
{
    /// <summary>
    /// The interface indicate that the inherite object has run ability
    /// </summary>
    public interface IRunable
    {
        /// <summary>
        /// Gets the task
        /// </summary>
        ITask Task { get; }
        /// <summary>
        /// Gets the template for this runable object
        /// </summary>
        ITemplate Template { get; }
        /// <summary>
        /// Gets the target for this runable object
        /// </summary>
        ITarget Target { get; }
        /// <summary>
        /// Gets the process that include this runable object instance
        /// </summary>
        IProcess Process { get; }
        /// <summary>
        /// Gets the action that include this runable object instance
        /// </summary>
        IAction Action { get; }
        /// <summary>
        /// Gets the parent runable object
        /// </summary>
        IRunable ParentRunable { get; }
        /// <summary>
        /// Gets the xmlnode that this runable object worked on
        /// </summary>
        XmlNode TgtWorkOnNode { get; }

   
        /// <summary>
        /// Run this object on specified target xml node
        /// </summary>
        /// <param name="tgtWorkOnNode"></param>
        void Run(XmlNode tgtWorkOnNode);
        /// <summary>
        /// If the runable object is broken by a breakpoint defined in template, call this function to pass the breakpoint once.
        /// </summary>
        void PassedBreakPoint();
    }
}
